package com.bdqn.boot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

/**
 * @author Hasee
 * @version 1.0
 * @className BookController
 * @description TODD
 * @date 2025/2/25 13:57
 */
@Controller
public class BookController {
/*    @GetMapping({"/","/login"})
    public String login(){
        return "login";
    }
    @PostMapping("/dologin")
    public String dologin(@RequestParam("userName") String
                          userName, @RequestParam("pwd") String pwd,
                          HttpSession session){
        //判断是否登录
        if ("admin".equals(userName) && "123456".equals(pwd)){
            session.setAttribute("userName", userName);
            session.setMaxInactiveInterval(10*60);
            return "redirect:/main";
        }

        return "login";
    }
    @RequestMapping("/main")
    public String mains(){
        return "main";
    }
    @RequestMapping("/cs")
    public String cs(){
        System.out.println(5/0);
        return "cs";
    }*/
}
